package main

import (
	"oa-rest/common"
	"oa-rest/config"
	"oa-rest/models/message"

	log "github.com/sirupsen/logrus"
)

func main() {
	config.InitEnv()
	db, err := common.ConnectDb()
	if err != nil {
		println(err)
	}
	defer db.Close()
	_, err = db.Exec("drop table if exists message ")
	if err != nil {
		log.Fatal(err)
	}

	err = db.Sync2(
		new(message.Message),
	)
	if err != nil {
		log.Fatal(err)
	}
}
